package chaoyue.study.client;

import chaoyue.study.bean.Depart;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@FeignClient(value = "depart-provider",path = "depart")
public interface DepartClient {
    @PostMapping("save")
    void save(@RequestBody Depart depart);

    @DeleteMapping("del/{id}")
    void delete(@PathVariable("id") Integer id);

    @PutMapping("update")
    void update(@RequestBody Depart depart);

    @GetMapping("get/{id}")
    Depart get(@PathVariable("id") Integer id);

    @GetMapping("list")
    List<Depart> list();
}
